package advanced.design_mode.buildermode;

public class SxtAirShipDircetor implements ShipDirector {
    private ShipBuilder shipBuilder;

    @Override
    public AirShip create() {
        Engine engine = shipBuilder.buildEngine();
        EscapeTower escapeTower = shipBuilder.buildEscapeTower();
        OrbitModule orbitModule = shipBuilder.buildOrbitModule();
        AirShip airShip = new AirShip();
        airShip.setEngine(engine);
        airShip.setEscapeTower(escapeTower);
        airShip.setOrbitModule(orbitModule);
        return airShip;
    }

    public SxtAirShipDircetor(ShipBuilder shipBuilder) {
        this.shipBuilder = shipBuilder;
    }
}
